package com.xpffly.design.proxy.statics.service.impl;

import com.xpffly.design.proxy.statics.service.House;

/**
 * @Author: xpengfei
 * @Date: 2021/3/29 23:21
 * @Description：代理对象 ，代理目标对象
 */
public class HouseProxy implements House {

    /**
     * 目标对象
     */
    private HouseSeller houseSeller;

    public HouseProxy(HouseSeller houseSeller) {
        this.houseSeller = houseSeller;
    }

    public void sellHouse() {
        System.out.println("我是房屋中介，代理售房....开始...");
        houseSeller.sellHouse();
        System.out.println("我是房屋中介，代理售房....结束...");
    }
}
